if(navigator.appName.indexOf('Microsoft') !=-1 ) {
	isIE = 1;
}

function addfields(frmName) {
	var o = document.forms[frmName].elements;
	for(i=0;i<o.length;i++){
		o[i].oblig=false;
	}
}

function addoblig(frmname, elems) {
	var k=document.forms[frmname].elements;
	for(i=0;i<elems.length;i++) {
		k[elems[i]].oblig=true;
	}
}

function xsubmit(frmName) {
	var o = document.forms[frmName].elements;
	var t=0;
	for(i=0;i<o.length;i++){
		if(o[i].oblig==true && (o[i].type=='checkbox' || o[i].type=='radio') ) {
			if(! o[i].checked) {
				t++;
			}
		} else if(o[i].oblig==true && ( ( (o[i].type=='text' || o[i].type=='password' || o[i].type=='textarea' || o[i].type=='file' || o[i].type=='hidden') && o[i].value.length==0) || (o[i].type=='select-one' && o[i].selectedIndex<=0 ) ) ) {
			t++;
			o[i].style.backgroundColor='#ffcccc';
		}
	}
	if(t!=0) {
		alert('Please fill in or select the required values');
		return false;
	}
	return true;
}